/* 基础样式 */
:root {
    --primary-color: #1890ff;
    --text-color: #333;
    --border-color: #e8e8e8;
    --bg-color: #f5f5f5;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hidden {
    display: none !important;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-text {
    background: none;
    color: var(--text-color);
}

.btn-text:hover {
    color: var(--primary-color);
}

.btn-block {
    display: block;
    width: 100%;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: var(--card-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

.navbar-menu {
    display: flex;
    gap: 1rem;
}

.navbar-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary-color);
    background-color: #e6f7ff;
}

/* 主要内容区域 */
.main {
    margin-top: 64px;
    padding: 2rem 0;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.search-box .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* 搜索结果提示信息 */
.search-message {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #666;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 搜索结果为空时的提示 */
.no-results {
    text-align: center;
    padding: 3rem 0;
    color: #999;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d9d9d9;
}

.no-results p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.no-results .suggestion {
    font-size: 0.875rem;
    color: #666;
}

/* 物品列表 */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.item-card:hover {
    transform: translateY(-4px);
}

.item-image {
    width: 100%;
    height: 200px;
    background-color: #f5f5f5;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    padding: 1rem;
}

.item-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.item-description {
    color: #666;
    margin-bottom: 1rem;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.875rem;
}

/* 表单样式 */
.form-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    max-width: 500px;
    margin: 0 auto;
}

.form-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* 物品状态样式 */
.item-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.item-status.lost {
    background-color: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.item-status.found {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.item-status.pending_claim {
    background-color: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.item-status.claimed {
    background-color: #f0f5ff;
    color: #1890ff;
    border: 1px solid #adc6ff;
}

/* 物品元信息样式 */
.item-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 页面标题样式 */
.page h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 500;
}

/* 详情页样式 */
.detail-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(300px, 2fr) 3fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.detail-image {
    width: 100%;
    height: 450px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-info h2 {
    font-size: 1.75rem;
    color: var(--text-color);
    margin-bottom: 0;
}

.detail-description {
    color: #666;
    line-height: 1.8;
    font-size: 1.1rem;
    flex-grow: 1;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    background-color: #fafafa;
    border-radius: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #666;
    font-size: 1rem;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* 评论区样式优化 */
.detail-comments {
    border-top: 1px solid var(--border-color);
    padding-top: 2.5rem;
    margin-top: 1rem;
}

.detail-comments h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.comments-list {
    margin-bottom: 2.5rem;
}

.comment-item {
    position: relative;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: white;
    transition: all 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comment-item:hover .comment-actions {
    opacity: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-user {
    font-weight: 500;
    color: var(--primary-color);
}

.comment-time {
    color: #999;
    font-size: 0.875rem;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-actions .btn-small {
    padding: 0.5rem;
    min-width: auto;
    color: #999;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.comment-actions .btn-small:hover {
    color: #ff4d4f;
    background-color: #fff1f0;
    border-radius: 4px;
}

.comment-actions .btn-small i {
    font-size: 1rem;
}

.comment-content {
    color: #333;
    line-height: 1.6;
}

/* 评论表单优化 */
.comment-form {
    background-color: #fafafa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2.5rem;
}

.comment-form textarea {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    min-height: 120px;
}

/* 评论区样式补充 */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-small i {
    font-size: 0.875rem;
}

.no-comments {
    text-align: center;
    color: #999;
    padding: 2rem 0;
}

.comment-form {
    margin-top: 2rem;
    overflow: hidden;
}

.comment-form textarea {
    width: 100%;
    height: 100px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form .btn {
    min-width: 100px;
}

/* 修改返回按钮样式 */
.detail-header .btn-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    font-weight: 500;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.detail-header .btn-text:hover {
    background-color: var(--primary-color);
    color: white;
}

.detail-header .btn-text i {
    font-size: 1rem;
}

/* 添加无图片时的占位样式 */
.no-image {
    color: #999;
    font-size: 1rem;
    text-align: center;
}

/* 评论操作按钮样式 */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-actions .btn-small {
    padding: 0.25rem;
    color: #999;
    transition: all 0.3s ease;
}

.comment-actions .btn-small:hover {
    color: #ff4d4f;
    background-color: #fff1f0;
}

.comment-actions .btn-small i {
    font-size: 1rem;
}

/* 删除按钮确认对话框样式 */
.delete-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.delete-confirm .buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.delete-confirm .btn-danger {
    background-color: #ff4d4f;
    color: white;
}

.delete-confirm .btn-danger:hover {
    background-color: #ff7875;
}

/* 物品操作按钮样式 */
.detail-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.detail-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.btn-danger {
    background-color: #ff4d4f;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger:hover {
    background-color: #ff7875;
}

.btn-danger i {
    font-size: 0.875rem;
}

/* 认领状态样式 */
.item-claimed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #666;
}

.item-claimed i {
    color: #52c41a;
    font-size: 1.1rem;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.claim-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.claim-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.25rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.claim-form .form-group {
    margin-bottom: 1rem;
}

.claim-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.claim-form input,
.claim-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.claim-form textarea {
    height: 100px;
    resize: vertical;
}

/* 认领状态样式 */
.claim-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.claim-status.pending {
    background-color: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.claim-status.approved {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.claim-status.rejected {
    background-color: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

.claim-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-success {
    background-color: #52c41a;
    color: white;
}

.btn-success:hover {
    background-color: #73d13d;
}

.btn-danger {
    background-color: #ff4d4f;
    color: white;
}

.btn-danger:hover {
    background-color: #ff7875;
}

/* 认领信息样式 */
.claim-info {
    background-color: #fafafa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    width: 100%;
}

.claim-details {
    margin-top: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.claim-row {
    display: flex;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.claim-row:last-child {
    margin-bottom: 0;
}

.claim-label {
    width: 100px;
    color: #666;
    flex-shrink: 0;
}

.claim-value {
    color: var(--text-color);
    flex: 1;
}

.claim-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* 认领状态标签样式 */
.claim-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.claim-status.pending {
    background-color: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.claim-status.approved {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.claim-status.rejected {
    background-color: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

.claim-status i {
    font-size: 1rem;
}

.btn-claim {
    background-color: #52c41a;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-claim:hover {
    background-color: #73d13d;
}

.btn-claim i {
    font-size: 1.1rem;
}

/* 文件上传按钮样式 */
.form-group input[type="file"] {
    display: none;  /* 隐藏原始的文件输入框 */
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #f5f5f5;
    border: 1px dashed #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #e6f7ff;
}

.file-upload-label i {
    font-size: 1.2rem;
}

.file-name {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.file-preview {
    margin-top: 1rem;
    width: 100%;
    max-width: 200px;
    height: 200px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: none;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
} 